<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title></title>
	</head>
	<body>
		<div id="app">
			<form class="mui-input-group" action="http://www.baidu.com">
				<div class="mui-input-row">
					
					<!-- 点击按钮，表单会自动跳转到百度 -->
					<input type="submit" class="mui-input-clear" value="提交">
					<!-- 点击按钮，按钮阻止表单的自动跳转行为，执行方法里的ajax请求                 v-on:click.prevent-->
					<input type="submit" class="mui-input-clear" value="阻止默认行为,ajax提交" v-on:click.prevent="fun1()"/>
				</div>
			</form>
		</div>
		<script src="../js/vuejs-2.5.16.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			const vue  = new Vue({
				el: "#app",
				data: {},
				methods: {
					fun1:function(){
						alert("发送ajax请求")
					}
				}
			})
		</script>
		
	</body>
</html>
